package com.sunforum.forum.service.impl;

import java.util.List;
import com.sunforum.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sunforum.forum.mapper.PcColumnClassificationMapper;
import com.sunforum.forum.domain.PcColumnClassification;
import com.sunforum.forum.service.IPcColumnClassificationService;

/**
 * pc_栏目分类Service业务层处理
 * 
 * @author sunforum
 * @date 2025-04-23
 */
@Service
public class PcColumnClassificationServiceImpl implements IPcColumnClassificationService 
{
    @Autowired
    private PcColumnClassificationMapper pcColumnClassificationMapper;

    /**
     * 查询pc_栏目分类
     * 
     * @param id pc_栏目分类主键
     * @return pc_栏目分类
     */
    @Override
    public PcColumnClassification selectPcColumnClassificationById(Long id)
    {
        return pcColumnClassificationMapper.selectPcColumnClassificationById(id);
    }

    /**
     * 查询pc_栏目分类列表
     * 
     * @param pcColumnClassification pc_栏目分类
     * @return pc_栏目分类
     */
    @Override
    public List<PcColumnClassification> selectPcColumnClassificationList(PcColumnClassification pcColumnClassification)
    {
        return pcColumnClassificationMapper.selectPcColumnClassificationList(pcColumnClassification);
    }

    /**
     * 新增pc_栏目分类
     * 
     * @param pcColumnClassification pc_栏目分类
     * @return 结果
     */
    @Override
    public int insertPcColumnClassification(PcColumnClassification pcColumnClassification)
    {
        pcColumnClassification.setCreateTime(DateUtils.getNowDate());
        return pcColumnClassificationMapper.insertPcColumnClassification(pcColumnClassification);
    }

    /**
     * 修改pc_栏目分类
     * 
     * @param pcColumnClassification pc_栏目分类
     * @return 结果
     */
    @Override
    public int updatePcColumnClassification(PcColumnClassification pcColumnClassification)
    {
        pcColumnClassification.setUpdateTime(DateUtils.getNowDate());
        return pcColumnClassificationMapper.updatePcColumnClassification(pcColumnClassification);
    }

    /**
     * 批量删除pc_栏目分类
     * 
     * @param ids 需要删除的pc_栏目分类主键
     * @return 结果
     */
    @Override
    public int deletePcColumnClassificationByIds(Long[] ids)
    {
        return pcColumnClassificationMapper.deletePcColumnClassificationByIds(ids);
    }

    /**
     * 删除pc_栏目分类信息
     * 
     * @param id pc_栏目分类主键
     * @return 结果
     */
    @Override
    public int deletePcColumnClassificationById(Long id)
    {
        return pcColumnClassificationMapper.deletePcColumnClassificationById(id);
    }
}
